﻿mainModule.controller("editCtrl", ["$scope", "policySvc", "$controller", "notification", function ($scope, apiSvc, $controller, notification) {
    "use strict";
    // instantiate base controller        
    $controller('BaseEditCtrl', { $scope: $scope, apiSvc: apiSvc });

    $scope.doAction = function (action) {
        apiSvc.doAction($scope.item.Id, action).then(function (response) {
            $scope.item = response.data.Value;            
            $scope.$emit($scope.events.editedEvent, $scope.item);            
        });
    };
}]);

